package com.sinaapp.gavinzhang.GSpider.webaddress;

import java.io.Serializable;

/**
 * @author gavin
 * @version 1.0
 * @date 2016/3/19
 * @description 网址bean
 */
public class WebAddress implements Serializable{
    private static final long serialVersionUID = 4077329331699640331L;
    private String url;
    private int deep;
    private int importance;

    public WebAddress() {
    }

    public WebAddress(String url, int deep, int importance) {
        this.url = url;
        this.deep = deep;
        this.importance = importance;
    }


    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getDeep() {
        return deep;
    }

    public void setDeep(int deep) {
        this.deep = deep;
    }

    public int getImportance() {
        return importance;
    }

    public void setImportance(int importance) {
        this.importance = importance;
    }

    @Override

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WebAddress that = (WebAddress) o;

        return url.equals(that.url);

    }

    @Override
    public int hashCode() {
        return url.hashCode();
    }

    @Override
    public String toString() {
        return "WebAddress{" +
                "url='" + url + '\'' +
                ", deep=" + deep +
                ", importance=" + importance +
                '}';
    }
}
